Skip to content

Fix -Wdefault-const-init-field-unsafe with clang 21#21135

Merged
arnaud-lb merged 1 commit intophp:masterfrom
arnaud-lb:zend-mm-clang
Feb 5, 2026
Merged

Fix -Wdefault-const-init-field-unsafe with clang 21#21135
arnaud-lb merged 1 commit intophp:masterfrom
arnaud-lb:zend-mm-clang

Conversation

@arnaud-lb
Copy link
Member

Zend/zend_alloc.c:3469:18: error: default initialization of an object of type 'zend_mm_storage' (aka 'struct _zend_mm_storage') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
 3469 |         zend_mm_storage tmp_storage, *storage;
      |                         ^
Zend/zend_alloc.h:313:25: note: member 'handlers' declared 'const' here
  313 |         const zend_mm_handlers handlers;
      |                                ^

@arnaud-lb arnaud-lb marked this pull request as ready for review February 5, 2026 13:30
@arnaud-lb arnaud-lb requested a review from dstogov as a code owner February 5, 2026 13:30
@arnaud-lb arnaud-lb merged commit 68a1062 into php:master Feb 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants